The invention is based on an apparatus and a method for encoding and decoding data according to the preamble to the independent claim. German patent document DE 30 32 468 has already disclosed encoding methods and apparatuses which use a so-called fire code. For a code of this kind, a generator polynomial in the form G(x)=P(x)(1+xC) is used, where P(x) is a so-called irreducible polynomial of the degree m, the use of such a fire code permits a simple recognition and correction of errors in the decoding.